/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponseBoolean } from "../models/BaseResponseBoolean";
import type { BaseResponseLong } from "../models/BaseResponseLong";
import type { BaseResponseUserVo } from "../models/BaseResponseUserVo";
import type { UserLoginRequest } from "../models/UserLoginRequest";
import type { UserRegistryRequest } from "../models/UserRegistryRequest";
import type { CancelablePromise } from "../core/CancelablePromise";
import { OpenAPI } from "../core/OpenAPI";
import { request as __request } from "../core/request";

export class UserControllerService {
  /**
   * @param requestBody
   * @returns BaseResponseLong OK
   * @throws ApiError
   */
  public static userRegistry(
    requestBody: UserRegistryRequest
  ): CancelablePromise<BaseResponseLong> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/user/registry",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * @param requestBody
   * @returns BaseResponseUserVo OK
   * @throws ApiError
   */
  public static userLogin(
    requestBody: UserLoginRequest
  ): CancelablePromise<BaseResponseUserVo> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/user/login",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * @param requestBody
   * @returns BaseResponseBoolean OK
   * @throws ApiError
   */
  public static updateAvatar(requestBody?: {
    file: Blob;
  }): CancelablePromise<BaseResponseBoolean> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/user/avatar",
      body: requestBody,
      mediaType: "application/json",
    });
  }

  /**
   * @returns BaseResponseUserVo OK
   * @throws ApiError
   */
  public static currentUserVo(): CancelablePromise<BaseResponseUserVo> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/user/current",
    });
  }
}
